<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/common/inc/incSession.jsp" %>
<jsp:include page="/common/inc/Top.jsp" />

<%
	String member_id = request.getParameter("member_id");
	String member_pw  = request.getParameter("member_pw");
	String member_name = request.getParameter("member_name");
	String nickname  = request.getParameter("nickname");
	String email = request.getParameter("email");
	String hp  = request.getParameter("hp");
	String zipcode = request.getParameter("zipcode");
	String addr1 = request.getParameter("addr1");
	String addr2 = request.getParameter("addr2");
	String member_img = request.getParameter("member_img");
	
	System.out.println("name===" + member_name);
	param.put("member_id",member_id);  
	param.put("member_pw",member_pw);  
	param.put("member_name",member_name);  
	param.put("nickname",nickname);  
	param.put("email",email);  
	param.put("hp",hp);  
	param.put("zipcode",zipcode);  
	param.put("addr1",addr1);  
	param.put("addr2",addr2);  
	param.put("member_img",member_img); 
	
	
	Object rc = "";
	boolean result = false;
		
	rc = sqlMap.insert("Member.insertMember",param);
	
	if(null == rc){
		result = true;
	}	
%>

<script type="text/javascript">
<%
	if(result){
%>
	alert('회원가입되었습니다');
	location.href="/";
<%
	}else{
%>
	alert('회원가입실패');
<%
	}
%>
</script>